/*
 * Copyright 2000-2020 ALPHA LAB.Inc All Rights Reserved.
 */
package com.alphalab.framework.test.queryTest;

import java.util.ArrayList;
import java.util.List;

import com.alphalab.framework.domain.AbstractValueObjectTransfer;

/**
 * TODO 在此写上类的相关说明.
 * @author allen 
 * @version 1.0.0 2017年12月28日
 */
public class ProjectItemDetailTransfer extends AbstractValueObjectTransfer<ProjectItemDetailVo, ProjectItemDetail>  {

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.IValueObjectTransfer#toVO(com.alphalab.framework.domain.BaseEntity)
	 */
	public ProjectItemDetailVo toVO(ProjectItemDetail paramPO) {
		if (paramPO == null) {
			return null;
		}
		ProjectItemDetailVo projectItemDetailVo = new ProjectItemDetailVo();
		projectItemDetailVo.setDescription(paramPO.getDescription());
		projectItemDetailVo.setName(paramPO.getName()); 
		return projectItemDetailVo;
	}

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.IValueObjectTransfer#toVO(java.util.List)
	 */
	public List<ProjectItemDetailVo> toVO(List<ProjectItemDetail> paramList) {
		if (paramList == null) {
			return null;
		}
		final List<ProjectItemDetailVo> result = new ArrayList<ProjectItemDetailVo>();
		for (ProjectItemDetail ProjectItemDetail : paramList) {
			result.add(toVO(ProjectItemDetail));
		}
		return result;
	}

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.IValueObjectTransfer#toPO(com.alphalab.framework.domain.AbstractValueObject)
	 */
	public ProjectItemDetail toPO(ProjectItemDetailVo paramVO) {
		if (paramVO == null) {
			return null;
		}
		ProjectItemDetail ProjectItemDetail = new ProjectItemDetail(); 
		ProjectItemDetail.setDescription(paramVO.getDescription());
		ProjectItemDetail.setName(paramVO.getName()); 
		return ProjectItemDetail;
	}

	/* (non-Javadoc)
	 * @see com.alphalab.framework.domain.IValueObjectTransfer#toPO(java.util.List)
	 */
	public List<ProjectItemDetail> toPO(List<ProjectItemDetailVo> paramList) {
		if (paramList == null) {
			return null;
		}
		final List<ProjectItemDetail> result = new ArrayList<ProjectItemDetail>();
		for (ProjectItemDetailVo ProjectItemDetailVo : paramList) {
			result.add(toPO(ProjectItemDetailVo));
		}
		return result;
	}	
}
